package com.flower.enjoyment.flower.mapper;

import com.flower.enjoyment.flower.entity.UserAppointment;
import com.flower.enjoyment.flower.entityDo.UserAppointmentDo;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserYuYueMapper {
    int deleteByPrimaryKey(String id);

    int insert(UserAppointment record);

    UserAppointmentDo selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(UserAppointment record);


    /**
     * 我的预约列表
     * @param userId
     * @return
     */
    Page<UserAppointmentDo> selectUserYuYueListByPage(@Param("userId") String userId);

    /**
     * 预约管理
     * 分页
     * @param shopId
     * @return
     */
    Page<UserAppointmentDo> selectShopAppointmentListByPage(@Param("shopId") String shopId);

    /**
     * 预约管理
     * 不分页
     * @param shopId
     * @return
     */
    List<UserAppointmentDo> selectShopAppointmentList(@Param("shopId") String shopId);

    /**
     * 根据用户id获取用户店铺预约数量
     * @param userId
     * @return
     */
    int selectCountByShopId(@Param("userId") String userId);

}